package jp.co.sharp.android.parents.kidsguard.dto;

import java.io.Serializable;
import java.util.Objects;

public class ContactListDto implements Serializable, Cloneable{

    private int id;
    private String name;
    private String yomi;
    private String portrait;
    private String phone;

    public ContactListDto() {

    }

    public ContactListDto(int id, String name, String yomi,String portrait,String phone) {
        this.id = id;
        this.name = name;
        this.yomi = yomi;
        this.portrait=portrait;
        this.phone=phone;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getYomi() {
        return yomi;
    }

    public void setYomi(String yomi) {
        this.yomi = yomi;
    }

    public String getPortrait() {
        return portrait;
    }

    public void setPortrait(String portrait) {
        this.portrait = portrait;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ContactListDto that = (ContactListDto) o;
        return id == that.id &&
                Objects.equals(name, that.name) &&
                Objects.equals(yomi, that.yomi) &&
                Objects.equals(portrait, that.portrait) &&
                Objects.equals(phone, that.phone);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, yomi, portrait, phone);
    }

    @Override
    public Object clone() throws CloneNotSupportedException {
        Object obj = super.clone();
        return obj;
    }
}
